package com.kee.example.domain;/*
 * Copyright (c) 2012 Keerthi Ramachandran .
 */

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

/**
 * This class... todo (RK) javadoc
 *
 * @author <a href="mailto:Keerthi.Ramachandran@navis.com">Keerthi Ramachandran</a>, 8/16/12
 * @since 2.4. /2012-08-16
 */
public class Contact {
    private String recipient;
    private Phone phone;
    private Order order;

    public Contact() {
    }

    public String getRecipient() {
        return recipient;
    }

    public void setRecipient(String inRecipient) {
        recipient = inRecipient;
    }

    public Phone getPhone() {
        return phone;
    }

    public void setPhone(Phone inPhone) {
        phone = inPhone;
    }

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order inOrder) {
        order = inOrder;
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder().append(this.recipient).append(this.phone).toHashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Contact other = (Contact) obj;
        return new EqualsBuilder().append(this.recipient, other.recipient).append(this.phone, other.phone).isEquals();
    }
}
